package com.mhys.hms.controller;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.mhys.hms.entity.FeedBackObject;
import com.mhys.hms.entity.Salary;
import com.mhys.hms.service.user.SalaryManagerService;

@Controller
public class SalaryManager {

	@Autowired
	private SalaryManagerService salaryManagerService;
	
	@RequestMapping(value="/querySalary", method= {RequestMethod.POST,RequestMethod.GET})
	@ResponseBody
	public FeedBackObject queryTrainInfo() {
		//分页查询
		List<Salary> list = salaryManagerService.queryAllSalary();
		//封装数据
		Map<String, Object> map = new HashMap<String, Object>();
		FeedBackObject feedbackObject = new FeedBackObject();
		map.put("total", salaryManagerService.queryAllSalary());
		map.put("data", list);
		feedbackObject.Obj = map;
		return feedbackObject;
	}
	
}
